package org.gc.webapp.util.page;

public class BasePageSO {
    /**
     * 当前页码
     */
    private int pageNumber = 1;
    /**
     * 每页记录数 page size
     */
    private int objectsPerPage = PageUtil.defaultPageSize;
    
    
    public BasePageSO() {
    }
    public BasePageSO(int start, int limit) {
        super();
        this.pageNumber = PageUtil.getPageNumFromStartAndLimit(start, limit);
        this.objectsPerPage = limit;
    }
    public int getPageNumber() {
        return pageNumber;
    }
    public void setPageNumber(int pageNumber) {
        if(pageNumber <= 0){
            pageNumber = 1;
        }
        this.pageNumber = pageNumber;
    }
    public int getObjectsPerPage() {
        return objectsPerPage;
    }
    public void setObjectsPerPage(int objectsPerPage) {
        this.objectsPerPage = objectsPerPage;
    }
    
}
